﻿'========================================================================
'功能:審核MVPN
'作者:andy
'日期:2011/6/10
'========================================================================
Imports System.Data
Partial Class WebForm_Form_MVPNApprove
    Inherits BasePage

    Protected Sub btnAddNew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAddNew.Click
        Response.Redirect(Me.ResolveUrl("~/WebForm/Form/ApproveApply.aspx?FormNo=" + Request.QueryString("FormNo")))
    End Sub

    Protected Sub btnModi_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnModi.Click
        Response.Redirect(Me.ResolveUrl("~/WebForm/Form/ChangeApplyArrpove.aspx?FormNo=") + Request.QueryString("FormNo"))
    End Sub
   
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim phase As String = ""
            If phase = "ApproveOA" Then ''IT駐廠處理
                Response.Redirect(Me.ResolveUrl("~/WebForm/Form/MVPNApproveIT.aspx?FormNo=") + Request.QueryString("FormNo"))

            End If

            Dim appDao As Telecom.DAO.ApplyDAO = New Telecom.DAO.ApplyDAO(dbName)
            Dim dt As DataTable = appDao.GetMVPNApplyByFlowerFormNo(Request.QueryString("FormNo"))
            If dt.Rows.Count > 0 Then  ''新增申請有資料
                Response.Redirect(Me.ResolveUrl("~/WebForm/Form/ApproveApply.aspx?FormNo=" + Request.QueryString("FormNo")))
            Else ''變更申請
                Response.Redirect(Me.ResolveUrl("~/WebForm/Form/ChangeApplyArrpove.aspx?FormNo=") + Request.QueryString("FormNo"))

            End If

        End If
    End Sub
End Class
